Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor WAL log writer && IO limiter #4107

Merged
merged 9 commits into from
Mar 2, 2022
Merged

Refactor WAL log writer && IO limiter #4107

merged 9 commits into from
Mar 2, 2022

Conversation

jiaqizho
Copy link
Contributor

@jiaqizho jiaqizho commented Feb 23, 2022

What problem does this PR solve?

Issue Number: ref #3594

Problem Summary:

What is changed and how it works?

  • PageStorage will pass IOLimiter when call write/read
  • for now, WALStore only supports passing IOLimiter in the constructor.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Feb 23, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JaySon-Huang

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added do-not-merge/needs-linked-issue do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 23, 2022
Signed-off-by: jiaqizho <zhoujiaqi@pingcap.com>
@ti-chi-bot ti-chi-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 24, 2022
@ti-chi-bot ti-chi-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 24, 2022
@jiaqizho jiaqizho changed the title [WIP]Change WAL log writer to writable file Refactor WAL log writer && IO limiter Feb 24, 2022
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 24, 2022
Signed-off-by: jiaqizho <zhoujiaqi@pingcap.com>
Signed-off-by: jiaqizho <zhoujiaqi@pingcap.com>
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor comment

dbms/src/Storages/Page/V3/LogFile/LogWriter.h Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 1, 2022
@jiaqizho
Copy link
Contributor Author

jiaqizho commented Mar 1, 2022

/merge

@ti-chi-bot
Copy link
Member

@jiaqizho: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 1, 2022
@ti-chi-bot
Copy link
Member

@jiaqizho: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@JaySon-Huang
Copy link
Contributor

/merge cancel

@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Mar 1, 2022
@jiaqizho
Copy link
Contributor Author

jiaqizho commented Mar 1, 2022

/run-all-tests

@sre-bot
Copy link
Collaborator

sre-bot commented Mar 1, 2022

Coverage for changed files

Filename                                      Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LogFile/LogWriter.cpp                              50                 1    98.00%           8                 1    87.50%         109                 8    92.66%          32                 0   100.00%
LogFile/LogWriter.h                                 1                 0   100.00%           1                 0   100.00%           3                 0   100.00%           0                 0         -
PageDirectory.cpp                                 183                41    77.60%          23                 4    82.61%         431                98    77.26%         138                36    73.91%
PageDirectory.h                                    16                 4    75.00%          14                 4    71.43%          52                15    71.15%           2                 1    50.00%
PageStorageImpl.cpp                                62                26    58.06%          18                10    44.44%         146                73    50.00%          32                21    34.38%
WAL/WALReader.cpp                                  44                 6    86.36%           7                 0   100.00%         106                 9    91.51%          30                 6    80.00%
WAL/WALReader.h                                     9                 2    77.78%           4                 1    75.00%          17                 6    64.71%           4                 1    75.00%
WALStore.cpp                                       70                 4    94.29%           7                 0   100.00%         116                 0   100.00%          34                 7    79.41%
tests/gtest_collapsing_page_directory.cpp         361                77    78.67%           4                 0   100.00%          95                 0   100.00%         110                52    52.73%
tests/gtest_wal_log.cpp                          2517               370    85.30%          49                 0   100.00%         532                 1    99.81%         768               351    54.30%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                            3313               531    83.97%         135                20    85.19%        1607               210    86.93%        1150               475    58.70%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16691      9466             43.29%    186700  95614        48.79%

full coverage report (for internal network access only)

@jiaqizho
Copy link
Contributor Author

jiaqizho commented Mar 1, 2022

/merge

@ti-chi-bot
Copy link
Member

@jiaqizho: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 5379c6e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 1, 2022
@sre-bot
Copy link
Collaborator

sre-bot commented Mar 1, 2022

Coverage for changed files

Filename                                      Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LogFile/LogWriter.cpp                              50                 1    98.00%           8                 1    87.50%         109                 8    92.66%          32                 0   100.00%
LogFile/LogWriter.h                                 1                 0   100.00%           1                 0   100.00%           3                 0   100.00%           0                 0         -
PageDirectory.cpp                                 183                41    77.60%          23                 4    82.61%         431                98    77.26%         138                36    73.91%
PageDirectory.h                                    16                 4    75.00%          14                 4    71.43%          52                15    71.15%           2                 1    50.00%
PageStorageImpl.cpp                                62                26    58.06%          18                10    44.44%         146                73    50.00%          32                21    34.38%
WAL/WALReader.cpp                                  44                 6    86.36%           7                 0   100.00%         106                 9    91.51%          30                 6    80.00%
WAL/WALReader.h                                     9                 2    77.78%           4                 1    75.00%          17                 6    64.71%           4                 1    75.00%
WALStore.cpp                                       70                 4    94.29%           7                 0   100.00%         116                 0   100.00%          34                 7    79.41%
tests/gtest_collapsing_page_directory.cpp         361                77    78.67%           4                 0   100.00%          95                 0   100.00%         110                52    52.73%
tests/gtest_wal_log.cpp                          2517               370    85.30%          49                 0   100.00%         532                 1    99.81%         768               351    54.30%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                            3313               531    83.97%         135                20    85.19%        1607               210    86.93%        1150               475    58.70%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16691      9466             43.29%    186700  95626        48.78%

full coverage report (for internal network access only)

@jiaqizho
Copy link
Contributor Author

jiaqizho commented Mar 2, 2022

/merge

@ti-chi-bot
Copy link
Member

@jiaqizho: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@sre-bot
Copy link
Collaborator

sre-bot commented Mar 2, 2022

Coverage for changed files

Filename                                      Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LogFile/LogWriter.cpp                              50                 1    98.00%           8                 1    87.50%         109                 8    92.66%          32                 0   100.00%
LogFile/LogWriter.h                                 1                 0   100.00%           1                 0   100.00%           3                 0   100.00%           0                 0         -
PageDirectory.cpp                                 183                41    77.60%          23                 4    82.61%         431                98    77.26%         138                36    73.91%
PageDirectory.h                                    16                 4    75.00%          14                 4    71.43%          52                15    71.15%           2                 1    50.00%
PageStorageImpl.cpp                                62                26    58.06%          18                10    44.44%         146                73    50.00%          32                21    34.38%
WAL/WALReader.cpp                                  44                 6    86.36%           7                 0   100.00%         106                 9    91.51%          30                 6    80.00%
WAL/WALReader.h                                     9                 2    77.78%           4                 1    75.00%          17                 6    64.71%           4                 1    75.00%
WALStore.cpp                                       70                 4    94.29%           7                 0   100.00%         116                 0   100.00%          34                 7    79.41%
tests/gtest_collapsing_page_directory.cpp         361                77    78.67%           4                 0   100.00%          95                 0   100.00%         110                52    52.73%
tests/gtest_wal_log.cpp                          2517               370    85.30%          49                 0   100.00%         532                 1    99.81%         768               351    54.30%
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                            3313               531    83.97%         135                20    85.19%        1607               210    86.93%        1150               475    58.70%

Coverage summary

Functions  MissedFunctions  Executed  Lines   MissedLines  Cover
16691      9467             43.28%    186700  95632        48.78%

full coverage report (for internal network access only)

@ti-chi-bot ti-chi-bot merged commit a89b3bb into pingcap:master Mar 2, 2022
@JaySon-Huang JaySon-Huang deleted the wal-replace-writablefile branch March 2, 2022 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants